package com.tang.subject.domain.convert;

import com.tang.subject.domain.entity.SubjectInfoBO;
import com.tang.subject.domain.entity.SubjectOptionBO;
import com.tang.subject.infra.basic.entity.es.SubjectInfoEs;
import com.tang.subject.infra.basic.entity.pojo.SubjectInfo;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

@Mapper
public interface SubjectInfoConverter {
    SubjectInfoConverter INSTANCE = Mappers.getMapper(SubjectInfoConverter.class);

    SubjectInfo convertBoToEntity(SubjectInfoBO subjectInfoBO);

    SubjectInfoBO convertOptionBoAndInfoToBo(SubjectOptionBO subjectOptionBO, SubjectInfo subjectInfo);

    List<SubjectInfoBO> convertInfoListToBo(List<SubjectInfo> subjectInfoBO);

    SubjectInfoEs convertInfoToEs(SubjectInfo subjectInfo);

    SubjectInfoEs convertBOToES(SubjectInfoBO subjectInfoBO);

    SubjectInfoBO convertEsToBo(SubjectInfoEs subjectInfoEs);
}
